import { Base } from '../base.js';

class Goods extends Base {
	
	getList(category_id = -1, price, sales) {
		var params = {
			url: 'v1/goods/list?category_id=' + category_id + '&price=' + price + '&sales=' + sales
		}
		return this.requestNoToken(params);
	}
	
	getListByCategoryId(category_id) {
		var params = {
			url: 'v1/goods/listbycategory?category_id='+category_id
		}
		return this.requestNoToken(params);
	}
	
	getDetail(id){
		var params = {
			url: 'v1/goods/detail?id=' + id
		}
		return this.requestNoToken(params);
	}
	
};

export { Goods };
